package com.wwl.springcloud.services;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;


/**
 * @author wwl
 * @version 1.0
 * @date 2021/8/10 19:09
 * @description:
 */
@Component
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT",fallback = PaymentFallbackService.class)//服务降级方法二
public interface PaymentService {

    @PostMapping(value = "/payment/hystrix/ok")
    public String getPaymentById(Integer id);

    @PostMapping (value = "/payment/hystrix/timeout")
    public String paymentFeignTimeout(Integer id);
}
